/**
 * 
 */
package las.dao.impl;

import las.dao.entity.EventAchievement;

import org.apache.ibatis.session.SqlSession;

/**
 * @author shayne
 *
 */
public class EventAchievementDao {

	public void save(EventAchievement ea, SqlSession session){
		session.insert("insertEventAch", ea);
	}
	
	public void delete(EventAchievement ea, SqlSession session){
		if(ea != null) {
			session.delete("deleteEventAch", ea.getId());
		}
	}
	
	public void delete(Integer id, SqlSession session){
		session.delete("deleteEventAch", id);
	}
	
	public void update(EventAchievement ea, SqlSession session){
		session.update("updateEventAch", ea);
	}
	
	public EventAchievement selectSimpleOne(Integer id, SqlSession session){
		return (EventAchievement)session.selectOne("findSimpleEventAchById", id);
	}
	
	public EventAchievement selectOne(Integer id, SqlSession session){
		return (EventAchievement)session.selectOne("findEventAchById", id);
	}
	
}
